#include <iostream>
using namespace std;
int main()
{
    int arr1[2][2];
    arr1[0][0] = 1;
    arr1[0][1] = 2;
    arr1[1][0] = 3;
    arr1[1][1] = 4;
    for (int i = 0; i < 2; i++)
    {
        for (int j = 0; j < 2; j++)
        {
            cout << arr1[i][j] << " ";
        }
    }

    int arr2[2][2] = {{5, 6}, {7, 8}};
    for (int i = 0; i < 2; i++)
    {
        for (int j = 0; j < 2; j++)
        {
            cout << arr2[i][j] << " ";
        }
    }

    int arr3[2][2]={9,10,11,12};
     for (int i = 0; i < 2; i++)
    {
        for (int j = 0; j < 2; j++)
        {
            cout << arr3[i][j] << " ";
        }
    }

    int arr4[][2]={13,14,15,16};
    for (int i = 0; i < 2; i++)
    {
        for (int j = 0; j < 2; j++)
        {
            cout << arr4[i][j] << " ";
        }
    }
    system("pause");
    return 0;
}
/*******************************
四种定义方式：
1.数据类型 数组名[行数][列数]；
2.数据类型 数组名[行数][列数]={ {数据1,数据2},{数据3,数据4}};//用该种提高代码的可读性
3.数据类型 数组名[行数][列数]={数据1，数据2,数据3,数据4};
4.数据类型 数组名[][列数]={数据1，数据2，数据3，数据4};
********************************/